<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>divMod</title>
</head>

<body>
    <script>
        const divMod = (x, y) => [Math.floor(x / y), x % y];
        const [div, mod] = divMod(8, 3);
        document.writeln(`8与3的商是${div},求余是${mod}`)
    </script>
</body>

</html>